A motor driver that drives and controls a direct-current motor, such as a VCM (voice coil motor) used to produce a mechanical force for moving a magnetic head in a hard disk drive, controls the speed of the direct-current motor by controlling the current value of the drive current fed to the motor coil provided in the direct-current motor. As a conventional technique, there has been proposed a speed control circuit for a direct-current motor wherein the back electromotive force that appears when the motor coil of the direct-current motor is driven is detected based on the current value of the current that flows through voltage division resistors, and, according to the back electromotive force thus detected, the speed of the direct-current motor is controlled (see Patent Publication 1 listed below).
In this speed control circuit, the resistance value of one of the voltage division resistors is changed so that the rotation speed is changed stepwise. Moreover, as the rotation speed of the direct-current motor is changed, the torque characteristic thereof against load changes accordingly. To suppress this change in the torque against load, the resistance value of a resistor connected in parallel with the direct-current motor between the voltage division resistors and the supply voltage is changed.
In a motor driver that controls the speed of a direct-current motor as described above, there is provided a back electromotive force detection circuit configured as shown in FIG. 7. This circuit includes: a resistor Rs of which one end is connected to one end of the motor coil L of the direct-current motor; a resistor R1 of which one end is connected to the other end of the resistor Rs; a differential amplifier circuit A1 of which the inverting input terminal is connected to the other end of the resistor R1 and of which the non-inverting input terminal is connected to the node between the resistor Rs and the motor coil L; a variable resistor R2 that is connected between the inverting input terminal and the output terminal of the differential amplifier circuit A1; a resistor R3 of which one end is connected to the output terminal of the differential amplifier circuit A1; a resistor R4 of which one end is connected to the other end of the resistor R3 and that receives a direct-current voltage Vref at the other end thereof; a resistor R5 of which one end is connected to the other end of the motor coil L; a differential amplifier circuit A2 whose non-inverting input terminal is connected to the node between the resistors R3 and R4 and whose inverting input terminal is connected to the other end of the resistor R5; and a resistor R6 that is connected to the inverting input terminal and the output terminal of the differential amplifier circuit A2.
Configured as described above, the back electromotive force detection circuit shown in FIG. 7 operates as follows. The differential amplifier circuit A1 outputs a signal containing, as a component thereof, the back electromotive force appearing in the motor coil L. Here, the resistance value of the internal resistance of the motor coil L varies with the ambient temperature of the motor driver, and thus an offset due to the change in the resistance value of the internal resistance of the motor coil L appears in the output of the differential amplifier circuit A2. To cancel this offset due to the change in the resistance value of the internal resistance of the motor coil L, the back electromotive force detection circuit shown in FIG. 7 further includes: a differential amplifier circuit A3 whose non-inverting input terminal is connected to the output terminal of the differential amplifier circuit A2 and that receives, as a reference voltage, a direct-current voltage Voff at the inverting input terminal thereof; and a resistance adjustment counter 100 that performs counting operation according to the output of the differential amplifier circuit A3 so as to change the resistance value of the variable resistor R2 to a resistance value proportional to the counted value.
As a result of the differential amplifier circuit A3 operating as a comparator, the resistance adjustment counter 100 performs counting operation according to the output of the differential amplifier circuit A3 every period of a clock fed in, and adjusts the resistance value of the variable resistor R2 to make it commensurate with the counted value. Here, in a case where the controlled target is a VCM for moving a magnetic head in a hard disk drive, first the magnetic head is kept stationary in contact with a spindle or the inner wall of a ramp area so that no back electromotive force appears, and then the resistance adjustment counter 100 is reset to an initial value. Then, the output from the differential amplifier circuit A2 is compared with the reference voltage Voff by the differential amplifier circuit A3, and, if the output from the differential amplifier circuit A2 is higher, the differential amplifier circuit A3 feeds a logically high output to the resistance adjustment counter 100.
Thus, on receiving a clock pulse, the resistance adjustment counter 100 counts one, and then changes the resistance value of the variable resistor R2 to make it commensurate with the counted value. After the resistance value of the variable resistor R2 is changed in this way, a similar sequence of operations is repeated; specifically, the output from the differential amplifier circuit A2 is compared with the reference voltage Voff and, if they are not equal, the resistance adjustment counter 100 performs counting operation and changes the resistance value of the variable resistor R2. By contrast, if the output from the differential amplifier circuit A2 equals the reference voltage Voff, the differential amplifier circuit A3 outputs a logic low. This makes the resistance adjustment counter 100 stop counting operation, and settles the resistance value of the variable resistor R2.
In this way, the resistance value of the variable resistor R2 is adjusted so that the output from the differential amplifier circuit A2 equals the reference voltage Voff and no offset appears. Thus, the back electromotive force detection circuit shown in FIG. 7 can cancel the offset that appears due to the resistance value of the internal resistance, which varies with temperature, of the motor coil L of the direct-current motor.    Patent Publication 1: Japanese Patent Application Published No. H8-4391